<html>
<head><meta charset="utf-8"><title>rustdoc link checker · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html">rustdoc link checker</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213004825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213004825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213004825">(Oct 12 2020 at 07:20)</a>:</h4>
<p>Shouldn't the rustdoc link checker <a href="https://github.com/rust-lang/rust/pull/77838#discussion_r503044345">catch issues like this</a>? PR CI passed...</p>



<a name="213013344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213013344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dániel Buga <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213013344">(Oct 12 2020 at 09:00)</a>:</h4>
<p><del>Interesting, it does in outer docs, but not in inner ones.</del> The issue is with the hyphen in the link label.</p>
<div class="codehilite"><pre><span></span><code>  |
5 | //! Some random [ref][link]
  |                       ^^^^ no item named `link` in `line_iter`
  |
  = note: `#[warn(broken_intra_doc_links)]` on by default
  = help: to escape `[` and `]` characters, add &#39;\&#39; before them like `\[` or `\]`
</code></pre></div>



<a name="213036342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213036342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213036342">(Oct 12 2020 at 13:16)</a>:</h4>
<p>There is <code>broken_intra_doc_links</code> and <code>src/tools/linkchecker</code>, I'm not sure which you mean</p>



<a name="213036383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213036383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213036383">(Oct 12 2020 at 13:17)</a>:</h4>
<p>Linkchecker didn't catch this because it's a reference link; it doesn't understand markdown, only HTML</p>



<a name="213036608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213036608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dániel Buga <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213036608">(Oct 12 2020 at 13:18)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> <a href="https://github.com/rust-lang/rust/issues/77845">https://github.com/rust-lang/rust/issues/77845</a> cmark_pulldown knows about broken reference links, they are just ignored as far as I can see</p>



<a name="213036682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213036682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213036682">(Oct 12 2020 at 13:19)</a>:</h4>
<p>Intra-doc links didn't catch it because of the hypen like dániel said: <a href="https://github.com/rust-lang/rust/issues/77199">https://github.com/rust-lang/rust/issues/77199</a></p>



<a name="213036787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213036787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213036787">(Oct 12 2020 at 13:20)</a>:</h4>
<p>Yes, because that's valid markdown syntax</p>



<a name="213036834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213036834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dániel Buga <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213036834">(Oct 12 2020 at 13:20)</a>:</h4>
<p>I didn't find it in the spec, common mark says [foobar] must be a reference link?</p>



<a name="213036915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213036915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213036915">(Oct 12 2020 at 13:21)</a>:</h4>
<p>If there's no reference for <code>[foobar]</code>, that means it should be displayed as the literal text <code>[foobar]</code></p>



<a name="213037157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213037157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dániel Buga <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213037157">(Oct 12 2020 at 13:23)</a>:</h4>
<p>But it's not, it goes through intra-doc-links and may get printed as a link anyway</p>



<a name="213037221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213037221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dániel Buga <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213037221">(Oct 12 2020 at 13:24)</a>:</h4>
<p>Hmm I guess that's actually the logical thing to do</p>



<a name="213037412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213037412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213037412">(Oct 12 2020 at 13:25)</a>:</h4>
<p>Right, which is why I closed your issue as a duplicate ;) this is a feature request for intra-doc links to warn on invalid syntax, not to change the markdown spec</p>



<a name="213037476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213037476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213037476">(Oct 12 2020 at 13:25)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/77199">https://github.com/rust-lang/rust/issues/77199</a></p>



<a name="213038140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustdoc%20link%20checker/near/213038140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dániel Buga <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustdoc.20link.20checker.html#213038140">(Oct 12 2020 at 13:30)</a>:</h4>
<p>All right, looks like I managed to debug a nothing-burger <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>